#

import requests

url = 'https://movie.douban.com/j/chart/top_list'

# 重新封装参数
param = {
    "type": "11",
    "interval_id": '100:90',
    "action": '',
    "start": 0,
    "limit": 20
}

heads = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36'
}

result = requests.get(url=url, params=param, headers=heads)

print(result.request.url)  # 查看请求是由谁发起的
print(result.request.headers)  # 查看请求头信息

print(result.text)
print('----------------------------------------')
print(result.json())
result.close()